home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19980901-19981211
/
000144_news@newsmaster….columbia.edu _Tue Oct 13 19:33:31 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA21463
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 13 Oct 1998 19:33:30 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA10546
for kermit.misc@watsun; Tue, 13 Oct 1998 19:33:30 -0400 (EDT)
Path: news.columbia.edu!panix!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!chippy.visi.com!news-out.visi.com!ptah.visi.com!visi.com!ekholm
From: Mike Ekholm <ekholm@nospam.visi.com>
Subject: Kermit script
Newsgroups: comp.protocols.kermit.misc
Organization: someplace that you are not at
X-readme: why are you looking at my headers?
X-snack: Try the new FOO.BAR. Now low fat!
User-Agent: tin/pre-1.4-980514 (UNIX) (SunOS/5.6 (sun4u))
Lines: 53
Message-ID: <VqRU1.139$fE6.283188@ptah.visi.com>
Date: Tue, 13 Oct 1998 23:33:09 GMT
NNTP-Posting-Host: 209.98.98.8
X-Complaints-To: abuse@visi.com
X-Trace: ptah.visi.com 908321589 209.98.98.8 (Tue, 13 Oct 1998 18:33:09 CDT)
NNTP-Posting-Date: Tue, 13 Oct 1998 18:33:09 CDT
Xref: news.columbia.edu comp.protocols.kermit.misc:9335
Hello.
I am attempting to write a simple script to sent the character "s" to the
serial port, then recive the the output from the serial port. I have
gotten the sending to work, but the recive part is not working. I have
tried the "input" command with no luck. if I do the script interactivly,
then do a "connect" I recive all the data I want, without doing anything
further. but the connect command is not very fun to use when doing this
non interactivly. What is the best way to have all the data recived from
the serial port go to stdout then have the script/kermit terminate?
What I am doing is monitoring a old UPS, which sends the stats out, when
it recives a "s" on the serial port. here is what I got from the
interactive session:
[/usr/home/ekholm] C-Kermit>set line /dev/cuaa0
[/usr/home/ekholm] C-Kermit> set speed 1200
/dev/cuaa0, 1200 bps
[/usr/home/ekholm] C-Kermit>output s\13
[/usr/home/ekholm] C-Kermit>output s\13
[/usr/home/ekholm] C-Kermit>connect
=> s
---- MICRO-FERRUPS SYSTEM STATUS ----
INVERTER: OFF
AC VOLTS OUT 121
AC AMPS OUT 3.76
OUTPUT LOAD (VA) 455
AC VOLTS IN 121
FREQUENCY 59.97
BATTERY VOLTS 13.5
HEATSINK (C) 032
# POWER OUTAGES 00090
INVERTER MINUTES 00170.2
SYSTEM HOURS 032345
# OVERLOADS 0080
PROJECTED BACKUP TIME AVAILABLE AT PRESENT LOAD: 0025 MINUTES
=>
So what I want to do is get everthing after the connect command, then have
kermit terminate. I have tried the input command, but i can only get that
to work like 'expect'
Thanks,
-Mike
--
ekholm@nospam.visi.com | http://www.visi.com/~ekholm | quake:Nalez
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nospam is valid, filter provided by my isp http://www.visi.com
Check my all new home page at http://www.visi.com/~ekholm/
640K ought to be enough for anybody! - Bill Gates, 1981
Unix is user-friendly, not beginner-friendly.